import Vue from "vue";
import Vuex from "vuex";

// import Sales from '@/views/sales'

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    sign_in: 0, //0未登录 1登录
    sign_up: "/user/sign_up", //注册地址
    sign_out: "/user/sign_out", //注销地址
    name: "",
    avatar: ""
  },
  mutations: {
    refreshUserInfo(state, json) {
      state.sign_in = json.sign_in;
      state.name = json.user.name;
      state.avatar = json.user.avatar;
    }
  }
});
